let ErrorUtils = require('./ErrorUtils');

class ApiError extends Error {
    constructor(error_name,error_info) {
        super();
        this.name = error_name;
        this.code = error_info.code;
        this.msg = error_info.msg;
        if(error_info.status){
            this.status = error_info.status;
        }
    }
}

module.exports = ApiError;